﻿@using OpenIddict.Sandbox.AspNet.Server.ViewModels.Authorization
@model AuthorizeViewModel

<div class="jumbotron">
    <h1>Authorization</h1>

    <p class="lead text-left">Do you want to grant <strong>@Model.ApplicationName</strong> access to your data? (scopes requested: @Model.Scope)</p>
    
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        @* Flow the request parameters so they can be received by the Accept/Reject actions: *@
        foreach (var parameter in Model.Parameters)
        {
            <input type="hidden" name="@parameter.Key" value="@parameter.Value" />
        }

        <input class="btn btn-lg btn-success" name="submit.Accept" type="submit" value="Yes" />
        <input class="btn btn-lg btn-danger" name="submit.Deny" type="submit" value="No" />
    }
</div>
